using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_BillCodeByMap : EntityTypeConfiguration<t_BillCodeBy>
    {
        public t_BillCodeByMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FBillTypeID, t.FFormatChar });

            // Properties
            this.Property(t => t.FBillTypeID)
                .IsRequired()
                .HasMaxLength(12);

            this.Property(t => t.FFormatChar)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FProjectVal)
                .IsRequired()
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("t_BillCodeBy");
            this.Property(t => t.FBillTypeID).HasColumnName("FBillTypeID");
            this.Property(t => t.FFormatChar).HasColumnName("FFormatChar");
            this.Property(t => t.FProjectVal).HasColumnName("FProjectVal");
            this.Property(t => t.FNumMax).HasColumnName("FNumMax");
        }
    }
}
